package com.xiaozhou.function.func;

import com.xiaozhou.function.IFunction;
import org.springframework.stereotype.Component;

/**
 * @author shhzhou
 * @description: 获取天气
 * @date 2024/10/31 15:32
 */
@Component
public class GetWeather implements IFunction {

    @Override
    public String execute(Object args) {
        String string = args.toString();
        if (string.contains("天河区")){
            return "天河区天气晴朗";
        }
        if (string.contains("白云区")){
            return "白云区天气多云";
        }
        if (string.contains("越秀区")){
            return "越秀区天气阴天";
        }
        if (string.contains("海珠区")){
            return "海珠区天气暴雨";
        }
        return "暂时无法查询，请稍后再试";
    }
}
